package com.hzw.saas.web.admin.user.param;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

import com.hzw.saas.common.util.AccountValidatorUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @author zzl
 * @since 04/08/2021
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "客户云账户注册", description = "客户云账户注册")
public class CustomerAccountAddParam {

    /**
     * 客户编号
     */
    @ApiModelProperty(value = "客户编号", position = 1, required = true)
    @NotBlank(message = "客户编号不可为空")
    private String CustomerNo;

    /**
     * 用户名
     */
    @ApiModelProperty(value = "用户名", position = 2, required = true)
    @NotBlank(message = "用户名不可为空")
    private String userName;

    /**
     * 密码
     */
    @ApiModelProperty(value = "密码", position = 3, required = true)
    @NotBlank(message = "密码不可为空")
    private String password;

    /**
     * 真实姓名
     */
    @Pattern(regexp = AccountValidatorUtil.REGEX_CHINESE_NAME_OR_BLANK, message = "姓名格式不正确")
    @ApiModelProperty(value = "真实姓名", position = 4)
    private String realName;

    /**
     * 电话号码
     */
    @ApiModelProperty(value = "电话号码", position = 5)
    @Pattern(regexp = AccountValidatorUtil.REGEX_MOBILE_OR_BLANK, message = "手机号码格式不正确")
    private String phoneNo;

    /**
     * 邮箱地址
     */
    @ApiModelProperty(value = "邮箱地址", position = 6)
    @Pattern(regexp = AccountValidatorUtil.REGEX_EMAIL_OR_BLANK, message = "邮箱格式不正确")
    private String email;

}
